package com.example.jsd2205.vx.emos.service;



import com.example.jsd2205.vx.emos.db.pojo.MessageEntity;
import com.example.jsd2205.vx.emos.db.pojo.MessageRefEntity;

import java.util.HashMap;
import java.util.List;
/*
 * @author admin 兰
 * */
public interface MessageService {
    public String insertMessage(MessageEntity entity);
    //插入消息
    public List<HashMap> searchMessageByPage(int userId, long start, int length);
    //分页查询结果
    public HashMap searchMessageById(String id);
    //根据ID查询数据
    public String insertRef(MessageRefEntity entity);
    //向REF集合插入数据
    public long searchUnreadCount(int userId);
    //查询未读消息的数量
    public long searchLastCount(int userId);

    public long updateUnreadMessage(String id);
    //修改
    public long deleteMessageRefById(String id);
    //根据用户删除消息
    public long deleteUserMessageRef(int userId);

}
